﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace DiscoveryLogic.UI.Layouts.Controls
{
    public class AspectContainer : Control
    {
        #region Constructors

            public AspectContainer()
            {

            }

        #endregion

        #region Get/Sets Properties

            double currentScaleFactor = 1;
            public virtual double Scale
            {
                get{ return currentScaleFactor; }
                set{ currentScaleFactor = value; }
            }
        #endregion

        #region Public Methods

            public virtual void AddAspect(Aspect a, int pos)
            {
            }

            public virtual void RemoveAspect(Aspect a)
            {

            }

            public virtual void DistributeAspects()
            {
            }

            public virtual bool HitTest(Aspect a)
            {
                return false;
            }

            public virtual void ShowSpots(AspectContainer aspectOwner)
            {
            }

            public virtual void HideSpots()
            {
            }

            // Removes the aspect from its owning list and adds it to this list
            public virtual void RemoveAddAspect(Aspect a, int pos)
            {
                // Remove from old list
                if (!(a.Owner == null))
                {
                    if (a.Owner.GetType() == typeof(FaveAspectContainer))
                    {
                        ((FaveAspectContainer)a.Owner).RemoveAspect(a);
                    }
                    //else if (a.Owner.GetType() == typeof(CrescentAspectContainer))
                    //{
                    //    ((CrescentAspectContainer)a.Owner).RemoveAspect(a);
                   // }
                }

                // Add to disc
                AddAspect(a, pos);
            }

        #endregion
    }
}
